package com.hzhk.happyrent.ui.view.viewpager;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;

public class RollViewPager extends ViewPager {

	public RollViewPager(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public RollViewPager(Context context) {
		super(context);
	}
	
	public void setCanScrolled(boolean canScrolled) {
		this.canScrolled = canScrolled;
	}

	private boolean canScrolled=true;
	@Override
	public void scrollTo(int x, int y) {
		if(canScrolled){
			super.scrollTo(x, y);
		}
	}
}
